package com.appwoo.txtws.activity;

import android.app.Application;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.widget.Toast;
import com.appwoo.txtws.component.CrypHelper;
import com.appwoo.txtws.component.Global;
import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.MKGeneralListener;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class ServerAppBean extends Application {

	public static String PeojectID;
	static ServerAppBean mDemoApp;
	private int FIRST;
	public List contaList;
	private boolean dial_status;
	private List f_capturePicList;
	private String imgDays;
	private String isFirLogin;
	private int listencount;
	public BMapManager mBMapMan;
	public android.app.KeyguardManager.KeyguardLock mKeyguardLock;
	public String mStrKey;
	boolean m_bKeyRight;
	private String mobileCount;
	private String nowDate;
	private String password;
	private String recordDays;
	public StringBuffer sb;
	private String taocanLeaveDays;
	private String taocanStatus;
	private String unlockpassword;
	private String userId;
	private String userName;

	public ServerAppBean() {
		contaList = new ArrayList();
		f_capturePicList = null;
		dial_status = true;
		mBMapMan = null;
		mStrKey = "F09466C723EB0B5691C6883E9CACB8D1E0A7B5FC";
		m_bKeyRight = true;
		sb = new StringBuffer(256);
	}

	public static String getPeojectID() {
		return PeojectID;
	}

	private void initDir() {
		try { 
			File file = getApplicationContext().getFilesDir();
			Global.SOFTPATHMEMORY = (new StringBuilder(String.valueOf(file
					.getParent()))).append(File.separator)
					.append(file.getName()).append("/").toString();
			Global.IMGPATHMEMORY = (new StringBuilder(String.valueOf(file
					.getParent()))).append(File.separator)
					.append(file.getName()).append("/").toString();
			Global.SOFTPATHSDCARD = (new StringBuilder(
					String.valueOf(Environment.getExternalStorageDirectory()
							.getPath()))).append("/txtw_soft/").toString();
			Global.IMGPATH = (new StringBuilder(String.valueOf(Environment
					.getExternalStorageDirectory().getPath()))).append(
					"/txtw_cache/").toString();
			File file1 = new File(Global.IMGPATH);
			if (!file1.exists())
				file1.mkdir();
			File file2 = new File(Global.SOFTPATHSDCARD);
			if (!file2.exists())
				file2.mkdir();
			return;
		} catch (Exception exception) {
			exception.printStackTrace();
		}
	}

	public static void setPeojectID(String s) {
		PeojectID = s;
	}

	public int getFIRST() {
		return FIRST;
	}

	public List getF_capturePicList() {
		return f_capturePicList;
	}

	public String getImgDays() {
		return imgDays;
	}

	public String getIsFirLogin() {
		return isFirLogin;
	}

	public int getListencount() {
		return listencount;
	}

	public String getMobileCount() {
		return mobileCount;
	}

	public String getNowDate() {
		return nowDate;
	}

	public String getPassword() {
		return password;
	}

	public String getProjectId() {
		return Global.PROJECT_ID;
	}

	public String getRecordDays() {
		return recordDays;
	}

	public String getTaocanLeaveDays() {
		return taocanLeaveDays;
	}

	public String getTaocanStatus() {
		return taocanStatus;
	}

	public String getUnlockpassword() {
		return unlockpassword;
	}

	public String getUserId() {
		Object localObject = null;
		if (this.userId == null)
			localObject = getSharedPreferences("firstLogin", 0).getString(
					"userid", null);
		try {
			String str = CrypHelper.des3DedoceCBCString((String) localObject);
			localObject = str;
			this.userId = ((String) localObject);
			return this.userId;
		} catch (Exception localException) {
			while (true)
				localException.printStackTrace();
		}
	}

	public String getUserName() {
		Object localObject = null;
		if (this.userName == null)
			localObject = getSharedPreferences("firstLogin", 0).getString(
					"user", null);
		try {
			String str = CrypHelper.des3DedoceCBCString((String) localObject);
			localObject = str;
			this.userName = ((String) localObject);
			return this.userName;
		} catch (Exception localException) {
			while (true)
				localException.printStackTrace();
		}
	}

	public boolean isDial_status() {
		return dial_status;
	}

	public void onCreate() {
		super.onCreate();
		initDir();
	}

	public void onTerminate() {
		super.onTerminate();
	}

	public void setDial_status(boolean flag) {
		dial_status = flag;
	}

	public void setFIRST(int i) {
		FIRST = i;
	}

	public void setF_capturePicList(List list) {
		f_capturePicList = list;
	}

	public void setImgDays(String s) {
		imgDays = s;
	}

	public void setIsFirLogin(String s) {
		isFirLogin = s;
	}

	public void setListencount(int i) {
		listencount = i;
	}

	public void setMobileCount(String s) {
		mobileCount = s;
	}

	public void setNowDate(String s) {
		nowDate = s;
	}

	public void setPassword(String s) {
		password = s;
	}

	public void setRecordDays(String s) {
		recordDays = s;
	}

	public void setTaocanLeaveDays(String s) {
		taocanLeaveDays = s;
	}

	public void setTaocanStatus(String s) {
		taocanStatus = s;
	}

	public void setUnlockpassword(String s) {
		unlockpassword = s;
	}

	public void setUserId(String s) {
		userId = s;
	}

	public void setUserName(String s) {
		userName = s;
	}


	public static class MyGeneralListener implements MKGeneralListener {
		public void onGetNetworkState(int paramInt) {
			if (ServerAppBean.mDemoApp != null)
				Toast.makeText(ServerAppBean.mDemoApp.getApplicationContext(),
						"", 1).show();
		}

		public void onGetPermissionState(int paramInt)
    {
      if ((paramInt == 300) && (ServerAppBean.mDemoApp != null))
      {
        Toast.makeText(ServerAppBean.mDemoApp.getApplicationContext(), "",Toast.LENGTH_LONG).show();
        ServerAppBean.mDemoApp.m_bKeyRight = false;
      }
    }
	}
}

/*
 * Location: C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name: com.appwoo.txtws.bean.ServerAppBean JD-Core Version: 0.6.2
 */